import publicApi from '@/api/public';
import store from '@/store';

//"unaccepted": 不予受理数,
//"reviewFailed": 审查不通过,
//"unhandled": 待受理,
//"pendingCorrection": 待补正,
//"pendingReview": 待审查,
//"approved": 审查通过,
//"unsubmitted": 待提交,
//inProcess ：办理中事项
const state = {
  count: {},
};
const mutations = {
  getCount: async (state) => {
    const params = {
      userType: store.state.user.userInfo.userType,
    };
    const res = await publicApi.getCount(params);
    state.count = {
      ...res,
      // inProcess: res.UNHANDLED + res.WANTAPPROVE + res.NEEDADD,
    } || {};
  },
};
const actions = {};
export default {
  namespaced: true, //添加方便dispatch
  state,
  mutations,
  actions,
};
